{__NOLAYOUT__}
<layout name="layoutPC" />
<link rel="stylesheet" href="__MOBILE__/css/jquery.Jcrop.min.css" type="text/css">
<div class="container-fluid" ng-controller="resumeProfileController">
<div class="row">
<div class="col-sm-8 col-sm-offset-2 text-center">
    <h1 class="main-title" style="font-size: 32px">
        完善资料，有助于您扩展人脉圈！
    </h1>
</div>
<div class="col-sm-8 col-sm-offset-2 text-center" style="margin-top: 45px">
<div class="line-box">
    <div class="line-box-title">
        个人资料
    </div>
    <div class="row">
        <div class="col-sm-10 col-sm-offset-1 text-center">
            <div class="head-pic">
                <div ng-switch="user_image">
                    <img ng-switch-when="2" src="__UPLOAD__/{{ user.image_url }}" alt="头像" style="margin-bottom:5px;">
                    <img ng-switch-when="1" src="__PUBLIC__/static/pc/img/default_avatar.png" alt="头像" style="margin-bottom:5px;">
                </div>
                <br />
                <button type="button" class="btn-upload-file" style="padding:4px 24px;">上传头像
                    <!-- <input type="file" /> -->
                    <form name="head" class="form-upload" action="<{:U('Upload/img')}>"
                          target="iframebox" enctype="multipart/form-data" method="post" >
                        <input type="file" id="image_file" name="avatar" class="input-imgfile"
                               onchange="fileSelectHandler();">

                        <!-- hidden crop params -->
                        <input type="hidden" id="x1" name="start_x" value="0"/>
                        <input type="hidden" id="y1" name="start_y" value="0" />
                        <input type="hidden" id="w" name="length_x" value="0"/>
                        <input type="hidden" id="h" name="length_y" value="0"/>
                    </form>
                </button>
            </div>
            <form id="personal-information-form" class="form-horizontal big-input-group" role="form">
                <div class="form-group">
                    <label class="col-sm-2 col-sm-offset-1 left-grey-lable">
                        真实姓名
                    </label>
                    <div class="col-sm-7">
                        <input type="text" class="form-control big-input" ng-model="user.user_name" placeholder="真实姓名">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 col-sm-offset-1 left-grey-lable">
                        性别
                    </label>
                    <div class="col-sm-7 col-sm-offset-1 text-left sex-radio">
                        <label class="radio-inline">
                            <input type="radio" ng-model="user.sex"  value="1" name="sex" >    男
                            <img src="__PUBLIC__/static/pc/img/male.png" alt="male"/>
                        </label>
                        <label class="radio-inline">
                            <input type="radio" ng-model="user.sex" value="2" name="sex" >   女
                            <img src="__PUBLIC__/static/pc/img/female.png" alt="female"/>
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <input type="hidden"  ng-model="user.user_name">
                    <input type="hidden"  ng-model="user.sex">
                    <label  class="col-sm-2 col-sm-offset-1 left-grey-lable">
                        出生日期
                    </label>
                    <div class="col-sm-7">
                        <input type="date" class="form-control big-input margin-0" id="inputBirthday" ng-model="birthday">
                    </div>
                </div>
                <div class="form-group" style="display:none;">
                    <div class="col-sm-8 col-sm-offset-3 text-left">
                        <div class="big-ckbx" >
                            <input type="checkbox" ng-model="isPublicBirthday"> 公开年份，月日默认保密
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label  class="col-sm-2 col-sm-offset-1 left-grey-lable">
                        现居住地
                    </label>
                    <div class="col-sm-3">
                        <select id="selectP" class="form-control big-input margin-0" ng-model="province" ng-options="m for m in provinces">
                            <option value="">--省份--</option>
                        </select>
                    </div>
                    <div class="col-sm-3">
                        <select class="form-control big-input margin-0" ng-model="city" ng-options="m for m in cities">
                            <option value="">--城市--</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label  class="col-sm-2 col-sm-offset-1 left-grey-lable">
                        学历信息
                    </label>
                    <div class="col-sm-3">
                        <div class="col-sm-10" style="margin-left: -15px">
                            <select class="form-control big-input margin-0" ng-model="user.degree_year" ng-options="m.value as m.value for m in degreeYears">
                                <option value="">--请选择--</option>
                            </select>
                        </div>
                        <span style="font-size: 28px;color: #667077;">级</span>
                    </div>
                    <div class="col-sm-3 padding-0" style="display:none;">
                        <div class="big-ckbx" >
                            <input type="checkbox" style="margin-right: -3px;" ng-model="isPublicDegree"> 公开学历信息
                        </div>
                    </div>
                </div>
                <div class="form-group" style="margin-bottom: 8px">
                    <div class="col-sm-7 col-sm-offset-3">
                        <input type="text" class="form-control big-input" ng-model="user.degree_school" placeholder="院校名称">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-7 col-sm-offset-3">
                        <input type="text" class="form-control big-input" ng-model="user.degree_major" placeholder="专业名称">
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-offset-1 col-sm-11 text-left">
                        <div class="line-box-information">
                            学历信息只开放填写一所学校/专业，多项学位证书者，建议择优填写。<br />
                            若同一院校就读过多专业，可如下：图片摄影/院线管理。
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<div class="line-box" style="margin-top: 85px">
    <div class="line-box-title">
        我是甲方：我要发活
    </div>
    <div class="row">
        <div class="col-sm-10 col-sm-offset-1 text-center">
            <form  class="form-horizontal big-input-group" role="form">
                <div class="form-group">
                    <label  class="col-sm-2 col-sm-offset-1 left-grey-lable">
                        代表机构
                    </label>
                    <div class="col-sm-7">
                        <input type="text" class="form-control big-input" ng-model="user.agent_j" placeholder="没有可不填">
                    </div>
                </div>
                <div class="form-group">
                    <label  class="col-sm-2 col-sm-offset-1 left-grey-lable">
                        机构简介
                    </label>
                    <div class="col-sm-7">
                        <textarea class="big-input form-control" rows="5" ng-model="user.agent_j_desc"></textarea>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<div class="line-box" style="margin-top: 85px;margin-bottom: 50px">
    <div class="line-box-title">
        我是乙方：我要接活
    </div>
    <div class="row">
        <div class="col-sm-10 col-sm-offset-1 text-center">
            <!-- <form  class="form-horizontal big-input-group" role="form">
                <div class="form-group">
                    <label  class="col-sm-2 col-sm-offset-1 left-grey-lable">
                        代表机构
                    </label>
                    <div class="col-sm-7">
                        <input type="text" class="form-control big-input" ng-model="user.agent_y" placeholder="没有可不填">
                    </div>
                </div>
                <div class="form-group">
                    <label  class="col-sm-2 col-sm-offset-1 left-grey-lable">
                        机构简介
                    </label>
                    <div class="col-sm-7">
                        <textarea class="big-input form-control" rows="5" ng-model="user.agent_y_desc"></textarea>
                    </div>
                </div>
            </form> -->
            <div class="work-time-picker double-column" style="margin: 40px 0">
                <div class="choice-picked">
                    岗位时限筛选
                    <div class="choices">
                        <div class="choice" ng-repeat="job in jobs"  ng-show="job.active">
                            {{job.stat_name}}
                            <div class="cancel" ng-click="jobClick($index)"></div>
                        </div>
                        <div class="choice" ng-repeat="duration in durations"  ng-show="duration.active" >
                            {{duration.name}}
                            <div class="cancel" ng-click="durationClick($index)"></div>
                        </div>
                    </div>

                </div>
                <div class="choice-unpicked">
                    岗位筛选（可多选）
                    <div class="work-choices" id="overflowhidden">
                        <div class="choice" ng-repeat="job in jobs" ng-click="jobClick($index)" ng-show="!job.active">
                            {{job.stat_name}}
                        </div>
                        <!--<div class="choice">
                            导演（团队/副导演）
                        </div>
                        <div class="choice">
                            编剧
                        </div>
                        <div class="choice">
                            制片（团队）
                        </div>
                        <div class="choice">
                            演员/模特/主持/配音
                        </div>
                        <div class="choice">
                            摄影/灯光
                        </div>
                        <div class="choice">
                            美术
                        </div>
                        <div class="choice">
                            录音/作曲
                        </div>
                        <div class="choice">
                            剪辑
                        </div>
                        <div class="choice">
                            调色
                        </div>
                        <div class="choice">
                            特效（二维/三维动画）
                        </div>
                        <div class="choice">
                            导演助理/场记
                        </div>
                        <div class="choice">
                            平面设计（UI/海报等）
                        </div>
                        <div class="choice">
                            平面摄影
                        </div>
                        <div class="choice">
                            开发/编程
                        </div>
                        <div class="choice">
                            其他
                        </div>-->
                    </div>
                    <hr>
                    时限筛选（可多选）
                    <div class="time-choices">
                        <div class="choice" ng-repeat="duration in durations" ng-click="durationClick($index)" ng-show="!duration.active">
                            {{duration.name}}
                        </div>
                        <!--<div class="choice">
                            三天内
                        </div>
                        <div class="choice">
                            两周内
                        </div>
                        <div class="choice">
                            三个月内
                        </div>
                        <div class="choice">
                            长期
                        </div>-->
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="uploadModal" tabindex="-1" role="dialog" aria-labelledby="ruploadModalLabel" aria-hidden="true">
        <div class="modal-dialog" style="width:100%;">
            <div class="modal-content">
                <div class="modal-header">
                    <div class="modal-title" id="uploadModalLabel">
                        选取图片
                    </div>
                </div>
                <div class="modal-body">
                    <div class="step2">
                        <img id="preview"/>
                        <div class="info">
                            <!--<label>文件大小</label> <input type="text" id="filesize" name="filesize" />-->
                            <!--<label>类型</label> <input type="text" id="filetype" name="filetype" />-->
                            <!--<label>图像尺寸</label> <input type="text" id="filedim" name="filedim" />-->
                            <!--<label>x-off</label> <input type="text" id="x1_off" name="w" />-->
                            <!--<label>y-off</label> <input type="text" id="y1_off" name="h" />-->
                            <!--<label>x</label> <input type="text" id="x2_off" name="w" />-->
                            <!--<label>y</label> <input type="text" id="y2_off" name="h" />-->
                            <!--<label>宽度</label> <input type="text" id="w_off" name="w" />-->
                            <!--<label>高度</label> <input type="text" id="h_off" name="h" />-->
                        </div>
                    </div>
                </div>
                <div class="modal-footer btn-group-card">
                    <button type="button" class="btn" onclick="uploadHeadCheck();">上传</button>
                    <a role="button" class="btn" data-dismiss="modal">取消</a>
                </div>
            </div>
        </div>
    </div>

</div>
</div>
<div class="row">
    <div class="col-sm-8 col-sm-offset-2">
        <div class="col-sm-6 text-center">
            <button class="btn-blue-line btn-lg btn-block" type="button" style="width: 300px;margin: 0 auto;" ng-click="submit()">完成，继续浏览</button>
            <p style="font-size: 17px;color: #AEAEAE;margin-top: 10px">不做乙方，完成填写，继续浏览！</p>
        </div>
        <div class="col-sm-6 text-center">
            <button class="btn-blue-line btn-lg btn-block" type="button" style="width: 300px;margin: 0 auto;" ng-click="submit()">完成，完善简历</button>
            <p style="font-size: 17px;color: #AEAEAE;margin-top: 10px">乙方尽快完善简历，以便早日接活！</p>
        </div>
    </div>
</div>
<iframe name="iframebox" src="" style="display:none" ></iframe>
<script>
    function uploadHeadCheck() {
        var exp = /.jpg$|.jpeg$|.gif$|.png$|.bmp$/;
        var file = document.head.avatar.files[0];
        if (file.size > 5 * 1024 * 1024) {
            alert("上传图片不能超过5M");
            return;
        }
        if (!exp.exec(file.type)) {
            alert("图片格式不正确");
            return;
        }
        document.head.submit();
    }

    function updateImg(res) {
        var appElement = document.querySelector('[ng-controller=resumeProfileController]');
        if (res.msg != null) {
            angular.element(appElement).scope().
                    imgChange(res.msg.url);
        } else if (res.err != null) {
            alert(res.err);
        }
    }
</script>
</div>
<script src="__MOBILE__/js/jquery.Jcrop.min.js"></script>
<script src="__PC__/js/fulfill.js"></script>